-
Notifications
You must be signed in to change notification settings - Fork 133
Start documentation section for Butterfly #460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for openrefine-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@Abbe98, @sunilnatraj, since both of you have worked on extensions, would you mind reading over this new bit of Butterfly documentation? I'd be interested in hearing if you find it useful, and/or if anything else would be useful to include here. |
tfmorris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just discovered these six month old comments from a review that I never submitted. Sorry!
The comment about "non-obvious conceptual stuff" probably needs expansion/explanation, but I'm going to submit this without further edits so it doesn't get pushed down on the stack again.
| different architecture, where data is stored on disk by default and cached in memory if the project is small enough. | ||
|
|
||
| ### Butterfly {#butterfly} | ||
| The functional extensibility of OpenRefine is provided by a fork of the [SIMILE Butterfly](https://github.com/OpenRefine/simile-butterfly) modular web application framework. With this framework, extensions are able to provide new functionality both in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The functional extensibility of OpenRefine is provided by a fork of the [SIMILE Butterfly](https://github.com/OpenRefine/simile-butterfly) modular web application framework. With this framework, extensions are able to provide new functionality both in the | |
| The functional extensibility of OpenRefine is provided by a fork of the [MIT SIMILE Butterfly](https://github.com/OpenRefine/simile-butterfly) modular web application framework. With this framework, extensions are able to provide new functionality both in the |
| The functional extensibility of OpenRefine is provided by a fork of the [SIMILE Butterfly](https://github.com/OpenRefine/simile-butterfly) modular web application framework. With this framework, extensions are able to provide new functionality both in the | ||
| server- and client-side. A [list of known extensions](https://openrefine.org/extensions) is maintained on our website and we have [specific documentation for extension developers](technical-reference/writing-extensions.md). | ||
|
|
||
| Butterfly organizes back-end functionality using a collection of modules. The only module exposed by OpenRefine is the `core` module, which provides extension points for other modules to hook into. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Butterfly organizes back-end functionality using a collection of modules. The only module exposed by OpenRefine is the `core` module, which provides extension points for other modules to hook into. | |
| Butterfly organizes back-end functionality using a collection of modules. The only module exposed by core OpenRefine (not including the bundled extensions) is the `core` module, which provides extension points for other modules to hook into. Butterfly modules can declare their dependencies using the `requires=` property in the `module/MOD-INFO/module.properties file. |
|
|
||
| Butterfly organizes back-end functionality using a collection of modules. The only module exposed by OpenRefine is the `core` module, which provides extension points for other modules to hook into. | ||
|
|
||
| Each module uses a JavaScript file named `controller.js` to connect different parts of the backend. Butterfly uses a JavaScript interpreter to run this and other provided JavaScript files to configure the back-end. Extensions rely on `controller.js`, and specifically an `init` method within that file, to leverage the aforementioned extension points. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth explaining how the Javascript/Java "glue" works here (or at least point to the extension docs).
More generally some of the non-obvious conceptual stuff should receive a significant portion of the attention.
|
|
||
| Each module uses a JavaScript file named `controller.js` to connect different parts of the backend. Butterfly uses a JavaScript interpreter to run this and other provided JavaScript files to configure the back-end. Extensions rely on `controller.js`, and specifically an `init` method within that file, to leverage the aforementioned extension points. | ||
|
|
||
| While Butterfly does allow for modules to manage their own API endpoints, extension modules typically register their endpoints through the form of commands. HTTP requests for those commands are then dispatched by the `core` module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True for HTTP commands, but there are many other extension registries for importers, exporters, GREL functions, etc.
As I learn more about OpenRefine's codebase, I figured I could contribute a little bit of what I've learned about Butterfly to the documentation. I've been trying to figure out an appropriate scope for an initial section on Butterfly (e.g. is it worthwhile to go into how request routing works?) but in the end decided to provide a small starting point and get feedback from others on where additional documentation might be helpful.